const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
const axisProps = require('../tw-lib-base/chart/axis-props')
const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  ...axisProps,
  ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        {
          "name": '学生成长',
          "value": 5,
          "label": {
            "position": "inside",
            "rotate": "tangential"
          }
        },
        {
          "name": '教师发展',
          "value": 3,
          "label": {
            "position": "inside",
            "rotate": "tangential"
          }
        },
        {
          "name": '学校管理',
          "value": 3,
          "label": {
            "position": "inside",
            "rotate": "tangential"
          }
        }
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  indicator: {
    type: Array,
    default () {
      return [
        {
          "name": "品德行为",
          "max": 100
        },
        {
          "name": "办学行为",
          "max": 100
        },
        {
          "name": "办学特色",
          "max": 100
        },
        {
          "name": "常规管理",
          "max": 100
        },
        {
          "name": "教学效能",
          "max": 100
        },
        {
          "name": "专业能力",
          "max": 100
        },
        {
          "name": "师德修养",
          "max": 100
        },
        {
          "name": "学业负担",
          "max": 100
        },
        {
          "name": "兴趣特长",
          "max": 100
        },
        {
          "name": "身心健康",
          "max": 100
        },
        {
          "name": "学业水平",
          "max": 100
        }
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  height: {
    type: String,
    default: '600px',
    name: '图表容器高度',
    filedType: 'string'
  },
  radiusLength: {
    type: String,
    default: '46%',
    name: '雷达图半径',
    filedType: 'string'
  },
  radarX: {
    type: String,
    default: '50%',
    name: '中心点横坐标位置',
    filedType: 'string'
  },
  radarY: {
    type: String,
    default: '50%',
    name: '中心点纵坐标位置',
    filedType: 'string'
  },
  startAngle: {
    type: String,
    default: '90',
    name: '起始点角度',
    filedType: 'string'
  },
  showName: {
    type: Boolean,
    default: true,
    name: '显示指示器名称',
    filedType: 'switch'
  },
  radarNameColor: {
    type: String,
    default: '#333',
    name: '主标题颜色',
    filedType: 'color'
  },
  radarNameSize: {
    type: String,
    default: '18',
    name: '主标题字体',
    filedType: 'string'
  },
  radarNameBgColor: {
    type: String,
    default: 'transparent',
    name: '主标题颜色',
    filedType: 'color'
  },
  radarLineColor: {
    type: String,
    default: '#ccc',
    name: '轴线颜色',
    filedType: 'color'
  },
  shape: {
    type: String,
    default: 'circle',
    name: '雷达图类型',
    filedType: 'select',
    options: [
      {
        name: 'circle',
        value: 'circle'
      },
      {
        name: 'polygon',
        value: 'polygon'
      }
    ]
  },

  sunburstColor: {
    type: String,
    default: '#fff',
    name: '外环标题颜色',
    filedType: 'color'
  },
  sunburstSize: {
    type: String,
    default: '20',
    name: '外环标题字体',
    filedType: 'string'
  },
  triggerType: {
    type: String,
    default: 'item',
    name: '触发类型',
    filedType: 'string'
  },
  showAxis: {
    type: Boolean,
    default: false,
    name: '显示坐标轴',
    filedType: 'switch'
  },

  useLiandong: {
    type: Boolean,
    default: true,
    name: '启用点击事件',
    filedType: 'switch'
  },


  value: {
    type: String,
    default: '',
    name: '选中雷达图标签',
    filedType: 'value',
    dataSource: {
      from: 'list',
      type: 'array',
      labelKey: 'label',
      valueKey: 'value'
    }
  },

  ...nodata

}
